package com.yf.tz.enums;

import lombok.Getter;

import java.util.Arrays;


/**
 * @author hxf
 * @email 505860922@qq.com
 * @date ${datetime}
 */
@Getter
public enum AccountRecordTypeEnum {


    CEC(0, "存储金"),


    POINT(1, "积分点");



    int index;
    String value;

    public static String[] names() {
        return Arrays.stream(AccountRecordTypeEnum.values()).map(m -> m.getValue()).toArray(String[]::new);
    }

    AccountRecordTypeEnum(int index, String value) {
        this.index = index;
        this.value = value;
    }

    public static String indexOf(int idx) {
        return AccountRecordTypeEnum.values()[idx].getValue();
    }

}
